package models

type GetCaptchaReq struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
	Phone    string `json:"phone" binding:"required"`
}
type CheckCaptchaReq struct {
	Username string `json:"username" binding:"required"`
	Captcha  string `json:"captcha" binding:"required"`
}

// --
// req

// UserLoginReq 用户登录req
type UserLoginReq struct {
	Username  string `json:"username" binding:"required"`   //用户名
	Password  string `json:"password" binding:"required"`   //密码
	SearchId  string `json:"search_id" binding:"required"`  //验证id
	CheckCode string `json:"check_code" binding:"required"` //验证码
}

// UserRegisterReq 用户注册req
type UserRegisterReq struct {
	NickName   string `json:"nick_name" binding:"required"`                    //昵称
	Username   string `json:"username" binding:"required"`                     //用户名
	Password   string `json:"password" binding:"required"`                     //密码
	RePassword string `json:"re_password" binding:"required,eqfield=Password"` //重复密码
	SearchId   string `json:"search_id" binding:"required"`                    //验证id
	CheckCode  string `json:"check_code" binding:"required"`                   //验证码
}

// UpdateBaseUserInfoReq 更新用户信息(基本)
type UpdateBaseUserInfoReq struct {
	NickName string `json:"nick_name" binding:"required"` //昵称
	Phone    string `json:"phone" binding:"required"`     //电话
	Sex      string `json:"sex" binding:"required"`       //性别
}

// UpdateUserPasswordReq 重置密码
type UpdateUserPasswordReq struct {
	OldPassword string `json:"old_password" binding:"required"`
	Password    string `json:"password" binding:"required"`                     //密码
	RePassword  string `json:"re_password" binding:"required,eqfield=Password"` //重复密码
}

// UpdateImgToUserReq 更新头像
type UpdateImgToUserReq struct {
	ImgId  string `json:"img_id" binding:"required"`  //图片Id
	ID     string `json:"id" binding:"required"`      //图片ID
	ImgUrl string `json:"img_url" binding:"required"` //图片链接
}

// resp

// UserLoginResp 用户登录 resp
type UserLoginResp struct {
	Token    string `json:"token"`     //令牌
	UserId   string `json:"user_id"`   //uuid
	NickName string `json:"nick_name"` //昵称
}
